const Mock = require('mockjs')
const fs = require('fs')

const data = Mock.mock({
    'list|10': [
        {
            'name|1-100': 1,
            'city': '@city',
            'title': '@ctitle(5)',
            'id': '@id'
        }
    ]
})

fs.writeFileSync('./data.json', JSON.stringify(data.list))